!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";(new(r(1).Initiator)).init()},function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=58)}([function(e,t,r){"use strict";var n=r(30),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===a.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r1&&void 0!==arguments[1]?arguments[1]:new Date;this.id="",this.name="",this.step=null,this.application=null,this.logger=null,this.fbtraceId="",this.lastParameters={},this.date=t,this.customerEntity=e,this.next=null}getCustomerEntity(){return this.customerEntity}getDate(){return this.date}init(e,t){this.application=e,this.logger=t}getId(e,t){return this.id||(this.id=(0,a.default)([(0,i.v4)(),e.external_id,window.location.href,this.getName(),t].join("/"))),this.id}getTime(){var e=this;return u((function*(){var t=yield e.application.getTime();if(t)return t;var r=new Date(e.getDate().getTime());return r.setMilliseconds(0),r.getTime()/1e3}))()}getName(){return this.name}isTriggerable(){if(!this.application.isCurrentStep(this.step))return!1;if(!Object.keys(this.lastParameters).length)return!0;var e=this.lastParameters.custom_data,t=this.getCustomDataParameters();return JSON.stringify(e)!==JSON.stringify(t)}getUserDataParameters(){var e=this;return u((function*(){var t=yield e.application.getCustomer();return e.customerEntity.init(t),e.customerEntity.getParameters()}))()}getParameters(e){var t=this;return u((function*(){var r=yield t.getTime(),n={event_id:t.getId(e,r),event_time:r,action_source:"website",event_source_url:window.location.href,event_name:t.getName(),user_data:e},a=yield t.getCustomDataParameters();return a&&(n.custom_data=a),n}))()}setFbtraceId(e){this.fbtraceId=e}setLastParameters(e){this.lastParameters=e}afterDispatch(){var e=this;return u((function*(){e.logger.info("[Facebook conversions ".concat(o.version,"] Event ").concat(e.name," has been sent"))}))()}afterDispatchError(){var e=this;return u((function*(){e.logger.info("[Facebook conversions ".concat(o.version,"] Couldn't send event ").concat(e.name))}))()}setNext(e){return this.next=e,e}shouldBeSent(){return this.next?this.next.shouldBeSent():""}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class n{static getId(){return n.id||(n.id=document.querySelector("html").getAttribute("data-store")||document.querySelector("html").getAttribute("data-checkout-store_id")||n.getFromScript()),n.id}static setId(e){n.id=e}static getFromScript(){var e=document.getElementById("pageview-script");return e?e.getAttribute("data-store"):null}}var a=n;t.default=a},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object.entries(e).forEach(e=>{var[r,n]=e,i=[...t,r].join(".");o.configs=o.configs?a(a({},o.configs),{},{[i]:n}):{[i]:n},n===Object(n)&&o.load(n,[...t,r])})}static read(e){return o.configs&&o.configs[e]||null}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(e){this.dataLayer=e,this.name="",this.nextStep=null}getCurrentStep(){return this.nextStep?this.nextStep.getCurrentStep():null}getName(){return this.name}isCurrent(){return this.dataLayer.filter(e=>{var{pageCategory:t=""}=e;return t.toLowerCase()===this.name.toLowerCase()}).length>0}setNext(e){return this.nextStep=e,e}}},function(e){e.exports=JSON.parse('{"name":"facebook-conversions","version":"2.0.71","description":"","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"jest --config jest.config.js --coverage=true","lint":"eslint src","webpack":"webpack --mode=production","webpack-dev":"webpack --mode=development","app":"nodemon server.js"},"repository":{"type":"git","url":"git@git.tray.net.br/commerce-apps/mapapp.git"},"keywords":[],"author":"Maria Santíssima","license":"ISC","devDependencies":{"@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-throw-expressions":"^7.14.5","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.8","babel-core":"^7.0.0-bridge.0","babel-loader":"^7.1.5","eslint":"^7.31.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.23.4","jest":"^27.0.6","nodemon":"^2.0.12","webpack":"^4.43.0","webpack-cli":"^3.3.12"},"dependencies":{"@jest/globals":"^27.0.6","axios":"^0.22.0","sha256":"^0.2.0","unorm":"^1.6.0","uuid":"^8.3.2"}}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r(12)),a=c(r(7)),i=c(r(82)),o=c(r(38)),s=c(r(83)),u=c(r(39));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class d extends n.default{constructor(e,t){super(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:new a.default(window.location.href)),this.currentStepObject=null}getSessionId(){var e,t=this;return(e=function*(){return t.dataLayer.find(e=>e.visitorSessionId).visitorSessionId},function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)}))})()}setSteps(){this.identificationStep=new i.default(this.dataLayer),this.cartStep=new o.default(this.dataLayer),this.checkoutStep=new s.default(this.dataLayer),this.purchaseStep=new u.default(this.dataLayer)}setName(){var e=["Carrinho","EasyCheckout_Identification","EasyCheckout_OrderConfirmation","EasyCheckout_OrderPlaced"],[t=""]=this.dataLayer.map(e=>{var{pageCategory:t}=e;return t}).filter(e=>void 0!==e);e=e.filter(e=>t.toLowerCase()===e.toLowerCase()),this.name=e.length&&t?"Easycheckout":""}setCurrentStep(){this.cartStep.setNext(this.checkoutStep).setNext(this.purchaseStep).setNext(this.identificationStep),this.currentStepObject=this.cartStep.getCurrentStep(),this.currentStep=this.currentStepObject?this.currentStepObject.getName():""}getStepData(){return this.currentStepObject?this.currentStepObject.getData():null}}var f=d;t.default=f},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{var[t,r=""]=e.split("=");t&&(this.params=a(a({},this.params),{},{[t]:r}))})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(62)),a=i(r(81));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{var[,t]=e;return window.location.href.match(t)})||[],l=c||"//".concat(window.location.host),d=s(s({},n.default.defaults),{},{baseURL:l,withCredentials:!0,headers:{post:{"Content-Type":"application/json"}}}),f=n.default.create(d);f.interceptors.request.use(a.default);var p=f;t.default=p},function(e,t,r){"use strict";(function(t){var n=r(0),a=r(69),i=r(32),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(u=r(33)),u),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,r=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||a&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(o)})),e.exports=c}).call(this,r(68))},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(){this.arrayMethods=["toJSON","filter","reduce"],this.arrayCallables={}}compatibilize(){this.compatibilizeArray()}compatibilizeArray(){var e=document.createElement("iframe");e.width=0,e.height=0,e.frameBorder=0,document.body.appendChild(e);var{Array:t}=e.contentWindow;this.arrayMethods.forEach(e=>{var{[e]:r}=Array.prototype,{[e]:n}=t.prototype;if(r&&n&&String(r)!==String(n))return this.arrayCallables[e]=r,void(Array.prototype[e]=n);r&&!n&&(this.arrayCallables[e]=r,delete Array.prototype[e])}),e.remove()}restore(){this.restoreArray()}restoreArray(){Object.entries(this.arrayCallables).length&&Object.entries(this.arrayCallables).forEach(e=>{var[t,r]=e;Array.prototype[t]=r})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(24),a=c(r(29)),i=c(r(7)),o=c(r(2)),s=c(r(3)),u=c(r(8));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)}))}}t.default=class{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a.default,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new i.default(window.location.href);this.logger=t,this.nextApp=null,this.sessionData={},this.sessionId="",this.ipAddress="",this.time=null,this.authenticationError="",this.pixelId="",this.url=r,this.debugBarCoordinates={},this.init(e)}init(e){this.dataLayer=e,this.setSteps(),this.setCurrentStep(),this.setName()}setSteps(){this.steps=[]}setCurrentStep(){this.currentStep="default"}setName(){this.name="default"}getName(){return this.name}getSessionId(){var e=this;return d((function*(){if(e.sessionId)return e.sessionId;var{session_id:t}=yield e.getSessionData();return e.sessionId=t,e.sessionId?e.sessionId:(e.sessionId=yield u.default.get(s.default.read("apiPaths.get.noCacheApp"),{params:{loja:o.default.getId(),nocahe:(0,n.v4)()}}).then(e=>{var{data:{hash:t=""}}=e;return t}).catch(()=>(e.logger.info("Faield on getting data"),"")),e.sessionId||(0,n.v4)())}))()}getIpAddress(){var e=this;return d((function*(){if(e.ipAddress)return e.ipAddress;var{ip:t}=yield e.getSessionData();return e.ipAddress=t,e.ipAddress||(e.ipAddress=yield u.default.get(s.default.read("apiPaths.get.noCacheInfo"),{params:{loja:o.default.getId()}}).then(e=>{var{data:{ip:t=""}}=e;return t}).catch(()=>(e.logger.info("Faield on getting data"),""))),e.ipAddress}))()}getTime(){var e=this;return d((function*(){if(e.time)return e.time;var{time:t}=yield e.getSessionData();return e.time=t,e.time&&(new Date(1e3*Number(e.time)).getFullYear()||0)>1970?e.time:null}))()}isDebuggingMode(){var e=this;return d((function*(){if(void 0!==e.debug)return e.debug;var{fbConversionsDebug:t=null}=e.url.params,{debug:r=null}=yield e.getSessionData();return 1!==Number(t)&&1!==Number(r)?(e.debug=!1,e.debug):1===Number(r)?(e.debug=!0,e.debug):(yield e.setDebugMode(1),e.debug)}))()}setDebugMode(e){var t=this;return d((function*(){var r=yield u.default.post(s.default.read("apiPaths.post.debug"),{debug:e},{params:{loja:o.default.getId()}}).then(e=>{var{data:{status:t=null}}=e;return t}).catch(()=>(t.logger.info("Faield on getting data"),null));return t.debug=null!==r&&0!==e,null!==r}))()}getDebugBarCoordinates(){var e=this;return d((function*(){if(Object.entries(e.debugBarCoordinates).length)return e.debugBarCoordinates;var{debug_bar_left:t=null,debug_bar_top:r=null}=yield e.getSessionData();return e.debugBarCoordinates=t&&r?{left:t,top:r}:{},e.debugBarCoordinates}))()}saveDebugBarCoordinates(e,t){var r=this;return d((function*(){if(!e||!t)return!1;var n=yield u.default.post(s.default.read("apiPaths.post.debug"),{debug_bar_left:e,debug_bar_top:t},{params:{loja:o.default.getId()}}).then(e=>{var{data:{status:t=null}}=e;return t}).catch(()=>(r.logger.info("Faield on getting data"),null));return r.debugBarCoordinates=null!==n?{left:e,top:t}:r.debugBarCoordinates,null!==n}))()}getAuthenticationError(){var e=this;return d((function*(){if(e.authenticationError)return e.authenticationError;var{authentication_error:t=""}=yield e.getSessionData();return e.authenticationError=t,e.authenticationError}))()}getPixelId(){var e=this;return d((function*(){if(e.pixelId)return e.pixelId;var{pixel:t=""}=yield e.getSessionData();if(e.pixelId=t,e.pixelId)return e.pixelId;var r=document.getElementsByTagName("script");return[,e.pixelId=""]=Object.values(r).map(e=>{var{src:t=""}=e,[r]=t.match(/[?&]pixel=[0-9]+(&|$)/g)||[""];return r.replace(/^[?&]+/,"").replace(/[?&]+$/,"").split("=")}).find(e=>{var[,t]=e;return t})||[],e.pixelId}))()}getSessionData(){var e=this;return d((function*(){if(Object.entries(e.sessionData).length)return e.sessionData;for(var t=0;t<4&&(e.sessionData=yield u.default.get(s.default.read("apiPaths.get.facebookInfo"),{params:{loja:o.default.getId(),nocahe:(0,n.v4)()}}).then(e=>{var{data:t}=e;return t===Object(t)?t:{}}).catch(()=>(e.logger.info("Faield on getting data"),{})),!(Object.entries(e.sessionData).length>0));t+=1);return e.sessionData}))()}getDataLayer(){return this.dataLayer}getCustomer(){var e=this;return d((function*(){return e.dataLayer.find(e=>e&&e.customerEmail)||e.getLoggedCustomerData()}))()}getLoggedCustomerData(){var e=this;return d((function*(){return u.default.get(s.default.read("apiPaths.get.updateGTM"),{params:{nocahe:(0,n.v4)()}}).then(e=>{var{data:{data:t=null}}=e;return t}).catch(()=>(e.logger.info("Faield on getting data"),null))}))()}isCurrentStep(e){return e.toLowerCase()===this.currentStep.toLowerCase()}getCurrentStep(){return this.currentStep}getCurrentApp(){return""!==this.name?this:this.nextApp?this.nextApp.getCurrentApp():null}setNextApp(e){return this.nextApp=e,e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r(8)),a=c(r(2)),i=c(r(3)),o=c(r(11)),s=c(r(25)),u=r(5);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)}))}}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;te).length;t.newRelicLogger.addParam("fbe_events_sent_count",i),yield t.newRelicLogger.sendParams()}))()}dispatch(e){var t=this;return d((function*(){if(t.busy[e])return t.newRelicLogger.addParam("fbe_observable_is_busy",t.busy[e]),t.newRelicLogger.addParam("fbe_".concat(e,"_observable_is_busy").toLowerCase(),t.busy[e]),!1;var r=t.subscribers[e].filter(e=>(e.init(t.application,t.logger),e.isTriggerable()));if(!r.length)return!1;t.busy[e]=!0;var o=yield r[0].getUserDataParameters(),s=r.map(function(){var e=d((function*(e){return e.getParameters(o)}));return function(t){return e.apply(this,arguments)}}()),u=yield Promise.all(s),c=u.find(t=>{var{event_name:r}=t;return r.toLowerCase()===e.toLowerCase()}),l=v.getNewRelicEventsParams(u);t.newRelicLogger.addParams(l),t.prototypeCompatibilizer.compatibilize();for(var f="",p=0;p<4&&(t.newRelicLogger.addParam("fbe_send_event_attempt",p+1),!(f=yield n.default.post(i.default.read("apiPaths.post.conversions"),u,{params:{loja:a.default.getId()}}).then(function(){var e=d((function*(e){return t.afterDispatch(u,e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(){var e=d((function*(e){var{response:r={}}=e;return t.afterDispatch(u,r)}));return function(t){return e.apply(this,arguments)}}())));p+=1);if(!f){var h=r.map(function(){var e=d((function*(e){return e.afterDispatchError()}));return function(t){return e.apply(this,arguments)}}());return yield Promise.all(h),t.prototypeCompatibilizer.restore(),t.busy[e]=!1,!1}yield t.pixel.init(o),u.forEach(e=>t.pixel.track(e));var g=r.map(function(){var e=d((function*(e){return e.setFbtraceId(f),e.setLastParameters(c),e.afterDispatch()}));return function(t){return e.apply(this,arguments)}}());return yield Promise.all(g),t.prototypeCompatibilizer.restore(),t.busy[e]=!1,!0}))()}afterDispatch(e,t){var r=this;return d((function*(){var{data:n=""}=t,{data:{events_received:a=0,fbtrace_id:i="",message:o="",type:s="",code:u=0,error_subcode:c=0}={},status:l=200}=t,d=200!==l&&(o||n!==Object(n)),f=yield r.application.getPixelId();return yield r.debugBar.appendRequest("POST","".concat(f,"/events"),l,e,n),200!==l&&d?(r.newRelicLogger.addParams({fbtrace_id:i,fbe_error_message:o||n,fbe_error_type:s,fbe_error_code:u,fbe_error_subcode:c}),""):(r.newRelicLogger.addParam("fbtrace_id",i),Number(a)>0?i:"")}))()}static getNewRelicEventsParams(e){var t={};return e.forEach((e,r)=>{t=p(p({},t),v.getNewRelicEventParams({["fbe_".concat(r)]:p({},e)}))}),t}static getNewRelicEventParams(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r={};return Object.entries(e).forEach(n=>{var[a,i]=n;if(i!==Object(i)){var o=[...t,a].join("_").toLowerCase();r=p(p({},r),{},{[o]:e[a]})}else r=p(p({},r),v.getNewRelicEventParams(i,[...t,a]))}),r}}var g=v;t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="ViewContent",this.step="produto"}getCustomDataParameters(){var e=this.application.getStepData();return{value:Number(e.priceSell),currency:"BRL",content_name:e.nameProduct,content_category:e.category,content_ids:[e.idProduct],content_type:"product"}}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{getCustomDataParameters(){var e=this.application.getStepData(),{products:t}=e.ecommerce.checkout,r=t.map(e=>Number(e.price)*Number(e.quantity)).reduce((e,t)=>e+t);return{value:Number(r),currency:"BRL",content_ids:t.map(e=>String(e.id)),content_type:"product"}}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(8)),a=o(r(3)),i=o(r(2));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}t.default=class{static log(e){return(t=function*(){return n.default.post(a.default.read("apiPaths.post.orderLog"),e,{params:{loja:i.default.getId()}}).then(()=>!0).catch(()=>!1)},function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(e){s(i,n,a,o,u,"next",e)}function u(e){s(i,n,a,o,u,"throw",e)}o(void 0)}))})();var t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="PageView",this.customSteps=["Home","Produto","Catalogo","Busca","Carrinho","EasyCheckout_OrderConfirmation","EasyCheckout_OrderPlaced"]}isTriggerable(){return this.customSteps=this.customSteps.map(e=>e.toLowerCase()),this.customSteps.indexOf(this.application.getCurrentStep().toLowerCase())<0}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(12))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:new a.default;this.application=e,this.params={},this.index=1}addParams(e){Object.entries(e).forEach(e=>{var[t,r]=e;return this.addParam(t,r)})}addParam(e,t){if(t){var[r]=Object.entries(this.params).find(t=>{var[,r]=t;return r===e})||[];if(r){var n=r.replace("key","value");this.params[n]=t}else this.params=s(s({},this.params),{},{["key".concat(this.index)]:e,["value".concat(this.index)]:t}),this.error=!1,this.index+=1}}getParams(){return this.params}sendParams(){var e,t=this;return(e=function*(){return 0===t.params.length},function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))})()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(4))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.hash="",this.apiRequestConfigs=null}isCurrent(){return window.location.hash===this.hash}getCurrentStep(){return this.isCurrent()?this:this.nextStep?this.nextStep.getCurrentStep():""}getApiRequestConfigs(){return this.apiRequestConfigs}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(48))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="Carrinho",this.hash="#carrinho"}getData(){return this.data=window.globalCart?window.globalCart.data:null,this.data}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r(98)),a=c(r(99)),i=c(r(101)),o=c(r(102)),s=c(r(104)),u=c(r(105));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;tv.getCustomerName("customerName",e,"fn"),ln:e=>v.getCustomerName("customerName",e,"ln")}}getParametersTemplate(){var e=this;return h((function*(){var t={client_user_agent:navigator.userAgent,external_id:yield e.application.getSessionId()},r=yield e.getFacebookCookies(),n=yield e.application.getIpAddress();return t=d(d({},t),{},{client_ip_address:i.default.validate(n)?n:null},r),Object.entries(t).forEach(t=>{var[r,n]=t;e.newRelicLogger.addParam("fbe_original_".concat(r),n)}),e.data?(Object.entries(e.exchangeFields).forEach(r=>{var[n,a]=r,i="function"==typeof a?a(e.data):e.data[a];i&&(t[n]=i)}),Object.entries(t).forEach(t=>{var[r,n]=t;e.newRelicLogger.addParam("fbe_original_".concat(r),n)}),t):t}))()}static getCustomerName(e,t,r){if(!t[e])return null;var a=t[e].replace(/[\s]{2,}/," ").split(" ").map(e=>{var[t]=n.default.nfd(e.toLowerCase()).replace(/[\s\u0300-\u036f]/g,"").match(/^[a-z]+$/g,"")||[""];return t.length>1?t:""});return{fn:a.find((e,t)=>e.length&&0===t),ln:a.find((e,t)=>e.length&&t>0&&t===a.length-1)}[r]||null}static getPhoneNumber(e,t,r){if(!t[e]||!r)return null;var n=u.default[r],a=t[e].replace(/[^\d]/,"");return"".concat(n).concat(a)}static getCity(e,t){var[r]=t[e]&&n.default.nfd(t[e].toLowerCase()).replace(/[\s\u0300-\u036f]/g,"").match(/^[a-z]+$/g,"")||[""];return r.length>1?r:null}static getState(e,t){var[r]=t[e]&&n.default.nfd(t[e].toLowerCase()).replace(/[\s\u0300-\u036f]/g,"").match(/^[a-z]+$/g,"")||[""];return 2===r.length?r:null}static getZipCode(e,t){return t[e]?t[e].replace(/[^\d]/,""):null}static getCountry(e,t){return t[e]?s.default[n.default.nfd(t[e].toLowerCase()).replace(/[\s\u0300-\u036f]/g,"")]:null}getFacebookCookies(){var e=this;return h((function*(){a.default.init(e.application,e.newRelicLogger);var t={fbc:"_fbc",fbp:"_fbp"},r={},n=Object.entries(t).map(function(){var e=h((function*(e){var[,t]=e;return v.getFacebookCookie(t)}));return function(t){return e.apply(this,arguments)}}()),i=yield Promise.all(n);return Object.entries(t).forEach((e,t)=>{var[n]=e;i[t]&&(r[n]=i[t])}),r}))()}static getFacebookCookie(e){return h((function*(){var t=yield a.default.read(e),r=t.split(".");if(4!==r.length)return null;var[n,i,o,s]=r,u="fb"===n,c=i.replace(/^[\s]+/,"").replace(/[\s]+$/,"").length>0&&!isNaN(i)&&Number(i)>=0&&Number(i)<=2,l=new Date(Number(o)).getFullYear()||0;return u&&c&&l>1970&&s.length?t:null}))()}}var g=v;t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(21))&&n.__esModule?n:{default:n};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;ta.default.getCustomerName("name",e,"fn"),ln:e=>a.default.getCustomerName("name",e,"ln"),ph:e=>u.getPhoneNumber("phone",e),ct:e=>u.getCity("city",e),st:e=>u.getState("state",e),zp:e=>u.getZipCode("zipCode",e),country:e=>u.getCountry("country",e)})}init(e){this.data=u.filterEntries(e)}static getPhoneNumber(e,t){var r=u.getCountry("country",t),n=a.default.getPhoneNumber(e,t,r),i=a.default.getPhoneNumber("cellphone",t,r);return n||i}static getCity(e,t){return u.getCountry("country",t)?a.default.getCity(e,t.address):null}static getState(e,t){return u.getCountry("country",t)?a.default.getState(e,t.address):null}static getZipCode(e,t){return u.getCountry("country",t)?a.default.getZipCode(e,t.address):null}static getCountry(e,t){var{address:r}=t,{[e]:n="",countryAbbr:i=""}=r===Object(r)?r:{};if(!n&&!i)return null;var o=a.default.getCountry(e,t.address),s=a.default.getCountry("countryAbbr",t.address);return o||s}static filterEntries(e){if(!e)return null;var t={};return Object.entries(e).forEach(e=>{var[r,n]=e;n&&(String(n).indexOf("*")>=0||(t[r]=n===Object(n)?u.filterEntries(n):n))}),Object.entries(t).length?t:null}}var c=u;t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))}}class s extends a.default{constructor(e){super(e.getCustomerEntity(),e.getDate()),this.event=e,this.name="PageView",this.customData=null}init(e,t){super.init(e,t),this.event.init(e,t)}isTriggerable(){return!s.triggered&&this.event.isTriggerable()}getCustomDataParameters(){return this.customData}setLastParameters(e){this.event.setLastParameters(e)}getUserDataParameters(){var e=this;return o((function*(){return e.event.getUserDataParameters()}))()}afterDispatch(){var e=()=>super.afterDispatch,t=this;return o((function*(){e().call(t),s.triggered=!0}))()}}var u=s;t.default=u},function(e,t,r){"use strict";var n;r.r(t),r.d(t,"v1",(function(){return v})),r.d(t,"v3",(function(){return x})),r.d(t,"v4",(function(){return S})),r.d(t,"v5",(function(){return D})),r.d(t,"NIL",(function(){return A})),r.d(t,"version",(function(){return k})),r.d(t,"validate",(function(){return s})),r.d(t,"stringify",(function(){return f})),r.d(t,"parse",(function(){return g}));var a=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}for(var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&o.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var l,d,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!s(r))throw TypeError("Stringified UUID is invalid");return r},p=0,h=0,v=function(e,t,r){var n=t&&r||0,a=t||new Array(16),o=(e=e||{}).node||l,s=void 0!==e.clockseq?e.clockseq:d;if(null==o||null==s){var u=e.random||(e.rng||i)();null==o&&(o=l=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==s&&(s=d=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:h+1,g=c-p+(v-h)/1e4;if(g<0&&void 0===e.clockseq&&(s=s+1&16383),(g<0||c>p)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=c,h=v,d=s;var y=(1e4*(268435455&(c+=122192928e5))+v)%4294967296;a[n++]=y>>>24&255,a[n++]=y>>>16&255,a[n++]=y>>>8&255,a[n++]=255&y;var b=c/4294967296*1e4&268435455;a[n++]=b>>>8&255,a[n++]=255&b,a[n++]=b>>>24&15|16,a[n++]=b>>>16&255,a[n++]=s>>>8|128,a[n++]=255&s;for(var m=0;m<6;++m)a[n+m]=o[m];return t||f(a)},g=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r},y=function(e,t,r){function n(e,n,a,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>9<<4)+1}function m(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function w(e,t,r,n,a,i){return m((o=m(m(t,e),m(n,i)))<<(s=a)|o>>>32-s,r);var o,s}function P(e,t,r,n,a,i,o){return w(t&r|~t&n,e,t,a,i,o)}function _(e,t,r,n,a,i,o){return w(t&n|r&~n,e,t,a,i,o)}function O(e,t,r,n,a,i,o){return w(t^r^n,e,t,a,i,o)}function C(e,t,r,n,a,i,o){return w(r^(t|~n),e,t,a,i,o)}var x=y("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r>5]>>>n%32&255,i=parseInt("0123456789abcdef".charAt(a>>>4&15)+"0123456789abcdef".charAt(15&a),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>32-t}var D=y("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var a=0;a>>0;m=b,b=y,y=E(g,30)>>>0,g=v,v=_}r[0]=r[0]+v>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+m>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),A="00000000-0000-0000-0000-000000000000",k=function(e){if(!s(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(59)),a=i(r(11));function i(e){return e&&e.__esModule?e:{default:e}}class o{static getPrototypeCompatibilizer(){return o.prototypeCompatibilizer||(o.prototypeCompatibilizer=new a.default),o.prototypeCompatibilizer}static getOperationalSystem(){var{userAgent:e}=navigator;return o.operationalSystem=o.operationalSystem||"",o.operationalSystem&&e.indexOf(o.operationalSystem)>=0||(e=e.replace(/^["]+/,"").replace(/["]+$/,""),e=o.clearOtherGroups(e),o.operationalSystem=o.getGroup(e).replace(/^[\s]{0,}\(+/,"").replace(/\)+[\s]{0,}$/,"")),o.operationalSystem}static getAgent(){if(!o.getOperationalSystem())return"";var{userAgent:e}=navigator;if(o.agent=o.agent||"",o.agent&&e.indexOf(o.agent)>=0)return o.agent;e=e.replace(/^["]+/,"").replace(/["]+$/,"");for(var t=e=o.clearOtherGroups(e),r=o.getGroup(e);r&&e;)t=e,e=e.substr(e.indexOf(r)).replace(r,""),r=o.getGroup(e);var n=e.match(/(^|[\s]).+?\/.+?(?=[\s]|$)/g)||[];e=n.length?e:t,r=o.getGroup(e),e=o.sanitizeUserAgent(e.replace(r,"")),t=o.sanitizeUserAgent(t.replace(r,""));var a=(e=o.sortUserAgent(e)||o.sortUserAgent(t)).match(/(^|[\s]).+?\/.+?(?=[\s]|$)/g)||[""];return e=a[a.length-1],[/(^#|[\s])Safari\/.+?(#|[\s]|$)/g,/(^#|[\s])AppleWebKit\/.+?(#|[\s]|$)/g,/(^|[\s])MSIE.+?(;|[\s]|$)/g].forEach(t=>{e||([e]=navigator.userAgent.match(t)||[""])}),o.agent=e.replace(/^[\s]+/,"").replace(/[\s]+$/,"").replace(/^\(+/,"").replace(/\)+$/,"").replace(/^[;]+/,"").replace(/[;]+$/,"").replace(/^[#]+/,"").replace(/[#]+$/,"").replace(/[\s]{2,}/," ").replace(/[\s]/,"/"),o.agent}static sanitizeUserAgent(e){var t=e.replace(/(^|[\s])Mobile\/.+?([\s]|$)/g," ").replace(/(^|[\s])Mozilla\/.+?([\s]|$)/g," ").replace(/Safari\/.+?([\s]|$)/g," ").replace(/(^|[\s])AppleWebKit\/.+?([\s]|$)/g," ").replace(/(^|[\s])MSIE.+?(;|[\s]|$)/g," ").replace(/(^|[\s])Gecko\/.+?([\s]|$)/g," ").replace(/(^|[\s])Version\/.+?([\s]|$)/g," ").replace(/(^|[\s])GSA\/.+?([\s]|$)/g," ").replace(/(^|[\s])NW\/.+?([\s]|$)/g," ").replace(/(^|[\s])PingdomPageSpeed\/.+?([\s]|$)/g," ").replace(/(^|[\s])OPT\/.+?([\s]|$)/g," ").replace(/(^|[\s])PTST\/.+?([\s]|$)/g," ").replace(/(^|[\s])SLBChan\/.+?([\s]|$)/g," ").replace(/(^|[\s])UWS\/.+?([\s]|$)/g," ").replace(/(^|[\s])Yowser\/.+?([\s]|$)/g," ").replace(/(^|[\s])Region\/.+?([\s]|$)/g," ").replace(/(^|[\s])SA\/.+?([\s]|$)/g," ").replace(/(^|[\s])ACHEETAHI\/.+?([\s]|$)/g," ").replace(/(^|[\s])Android\/.+?([\s]|$)/g," ").replace(/(^|[\s])language\/.+?([\s]|$)/g," ").replace(/(^|[\s])Console\/.+?([\s]|$)/g," ").replace(/(^|[\s])newsbreak\/.+?([\s]|$)/g," ").replace(/(^|[\s])Flipboard\/.+?([\s]|$)/g," ").replace(/(^|[\s])ByteFullLocale\/.+?([\s]|$)/g," ").replace(/(^|[\s])WeChat\/.+?([\s]|$)/g," ").replace(/(^|[\s])AppSkin\/.+?([\s]|$)/g," ").replace(/[\s]+Browser/g,"Browser").replace("baidu.sogo.uc."," ").replace(/[\s]{2,}/," ").replace(/^[\s]+/,"").replace(/[\s]+$/,"").match(/(^|[\s]).+?\/.+?(?=[\s]|$)/g)||[""];return o.getPrototypeCompatibilizer().compatibilize(),t=t.map(e=>{var[t]=e.replace(/[\s]{2,}/," ").replace(/^[\s]+/,"").replace(/[\s]+$/,"").match(/([\s]).+?\/.+?(?=[\s]|$)/g)||[e];return t.replace(/.+[\s]/g,"")}).filter(e=>e).filter((e,t,r)=>r.indexOf(e)===t),o.getPrototypeCompatibilizer().restore(),t.join("")}static sortUserAgent(e){var t=e.replace(/^[\s]+/,"").replace(/[\s]+$/,""),r=t.match(/(^|[\s]).+?\/.+?(?=[\s]|$)/g)||[""];return n.default.permute(r).forEach(e=>{if(!t.match(/^Chrome\/.+?([\s]|$)/g)){var[r]=e;r=r.replace(/^[\s]+/,"").replace(/[\s]+$/,""),t=r.match(/Chrome\/.+?([\s]|$)/g)?t:e.reverse().join(" ")}}),t}static getName(){var e=o.getAgent().split("/").filter(e=>e);return e.length?e.slice(0,e.length-1).join("/").replace(/^[\s]+/,"").replace(/[\s]+$/,""):""}static getVersion(){var e=o.getName(),t=e?o.getAgent().replace("".concat(e,"/"),"").replace(/^[\s]+/,"").replace(/[\s]+$/,""):"";return t!==e?t:""}static clearOtherGroups(e){var t=e,r="";return[["[\\s]?\\[.+?\\][\\s]?",".+?\\][\\s]?",/\[/g,/\]/g],["[\\s]?\\{.+?\\}[\\s]?",".+?\\}[\\s]?",/\{/g,/\}/g]].forEach(e=>{for(r=o.getGroup(t,e);r&&t;)t=t.replace(r,""),r=o.getGroup(t,e);r=o.getGroup(t,e),t=t.replace(r,"")}),t}static getGroup(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["[\\s]?\\(.+?\\)[\\s]?",".+?\\)[\\s]?",/\(/g,/\)/g],[r,n,a,i]=t,o=r,[s]=e.replace(/^[\s]+/,"").replace(/[\s]+$/,"").match(new RegExp(o,"g"))||[""];if(!s)return s;var u=s.match(a),c=s.match(i);if(u.length===c.length)return s;for(;u.length!==c.length&&(o="".concat(o).concat(n),[s]=e.match(new RegExp(o,"g"))||[""],s);)u=s.match(a),c=s.match(i);return s}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(r(27)),a=f(r(47)),i=f(r(57)),o=f(r(53)),s=f(r(55)),u=f(r(56)),c=f(r(17)),l=f(r(23)),d=f(r(22));function f(e){return e&&e.__esModule?e:{default:e}}class p extends n.default{getEasycheckoutApp(){return new a.default(this.dataLayer,this.logger)}getEasycheckoutObservable(){if(this.easycheckoutObservable instanceof i.default)return this.easycheckoutObservable;this.easycheckoutObservable=new i.default(this.currentApp,this.pixel,this.logger,this.debugBar,this.newRelicLogger);var e=new d.default(this.currentApp,this.newRelicLogger),t=new o.default(e),r=new s.default(e),n=new u.default(e),a=new c.default(e);return this.easycheckoutObservable.subscribe("AddToCart",t),this.easycheckoutObservable.subscribe("InitiateCheckout",r),this.easycheckoutObservable.subscribe("Purchase",n),this.easycheckoutObservable.subscribe("AddToCart",new l.default(t)),this.easycheckoutObservable.subscribe("InitiateCheckout",new l.default(r)),this.easycheckoutObservable.subscribe("Purchase",new l.default(n)),this.easycheckoutObservable.subscribe("PageView",new l.default(a)),this.easycheckoutObservable}}var h=p;t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(r(28)),a=f(r(45)),i=f(r(57)),o=f(r(49)),s=f(r(51)),u=f(r(52)),c=f(r(17)),l=f(r(23)),d=f(r(22));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class h extends n.default{getEasycheckoutApp(){return new a.default(this.dataLayer,this.logger)}initEasycheckoutObservable(){var e,t=this;return(e=function*(){return t.getEasycheckoutObservable(),!0},function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){p(i,n,a,o,s,"next",e)}function s(e){p(i,n,a,o,s,"throw",e)}o(void 0)}))})()}getEasycheckoutObservable(){var e=new i.default(this.currentApp,this.pixel,this.logger,this.debugBar,this.newRelicLogger),t=new d.default(this.currentApp,this.newRelicLogger),r=new o.default(t),n=new s.default(t),a=new u.default(t),f=new c.default(t);return e.subscribe("AddToCart",r),e.subscribe("InitiateCheckout",n),e.subscribe("Purchase",a),e.subscribe("AddToCart",new l.default(r)),e.subscribe("InitiateCheckout",new l.default(n)),e.subscribe("Purchase",new l.default(a)),e.subscribe("PageView",new l.default(f)),e}}var v=h;t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(r(6)),a=_(r(40)),i=_(r(13)),o=_(r(84)),s=_(r(41)),u=_(r(87)),c=_(r(14)),l=_(r(43)),d=_(r(44)),f=_(r(88)),p=_(r(89)),h=_(r(90)),v=_(r(17)),g=_(r(91)),y=_(r(23)),b=_(r(18)),m=_(r(21)),w=_(r(106)),P=r(5);function _(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function C(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){O(i,n,a,o,s,"next",e)}function s(e){O(i,n,a,o,s,"throw",e)}o(void 0)}))}}t.default=class{init(e,t){var r=this;return C((function*(){r.logger=t,r.dataLayer=e,r.currentApp=r.getCurrentApp(),r.currentApp&&(r.newRelicLogger=new b.default(r.currentApp),r.debugBar=new w.default(r.currentApp),r.pixel=new g.default(r.currentApp,r.logger,r.debugBar,r.newRelicLogger),r.logger.info("[Facebook conversions ".concat(P.version,"] Listening to ").concat(r.currentApp.getName())),yield r.initStoreObservable(),yield r.initEasycheckoutObservable())}))()}getStoreApp(){return new a.default(this.dataLayer,this.logger)}getEasycheckoutApp(){return new n.default(this.dataLayer,this.logger)}getCurrentApp(){var e=this.getStoreApp(),t=this.getEasycheckoutApp();return e.setNextApp(t),e.getCurrentApp()}initStoreObservable(){var e=this;return C((function*(){return e.currentApp instanceof a.default&&e.getStoreObservable().dispatchAll(["ViewHome","ViewContent","ViewCategory","Search","PageView"])}))()}getStoreObservable(){var e=new i.default(this.currentApp,this.pixel,this.logger,this.debugBar,this.newRelicLogger),t=new m.default(this.currentApp,this.newRelicLogger),r=new s.default(t),n=new u.default(t),a=new c.default(t),o=new l.default(t),f=new d.default(t),p=new v.default(t);return e.subscribe("ViewHome",r),e.subscribe("ViewContent",n),e.subscribe("ViewContent",a),e.subscribe("ViewCategory",o),e.subscribe("Search",f),e.subscribe("ViewHome",new y.default(r)),e.subscribe("ViewContent",new y.default(a)),e.subscribe("ViewCategory",new y.default(o)),e.subscribe("Search",new y.default(f)),e.subscribe("PageView",new y.default(p)),e}initEasycheckoutObservable(){var e=this;return C((function*(){return e.currentApp instanceof n.default&&(e.getEasycheckoutObservable(),!0)}))()}getEasycheckoutObservable(){var e=new o.default(this.currentApp,this.pixel,this.logger,this.debugBar,this.newRelicLogger),t=new m.default(this.currentApp,this.newRelicLogger),r=new f.default(t),n=new p.default(t),a=new h.default(t),i=new v.default(t);return e.subscribe("AddToCart",r),e.subscribe("InitiateCheckout",n),e.subscribe("Purchase",a),e.subscribe("AddToCart",new y.default(r)),e.subscribe("InitiateCheckout",new y.default(n)),e.subscribe("Purchase",new y.default(a)),e.subscribe("PageView",new y.default(i)),e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(){this.logs={}}info(e){var{info:t=[]}=this.logs;t.push(e),this.logs.info=t}getInfo(){return this.logs.info}}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{var{ecommerce:{checkout:{products:t=[]}={}}={}}=e;return t.length>0}).reverse();return e}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(4))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_OrderPlaced"}getCurrentStep(){var e=void 0!==this.getData();return this.isCurrent()&&e?this:super.getCurrentStep()}getData(){return this.dataLayer.find(e=>{var{ecommerce:{purchase:t=null}={}}=e;return null!==t})}setNext(e){return this.nextStep=e,e}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(12))&&n.__esModule?n:{default:n};class i extends a.default{setSteps(){this.steps=this.dataLayer.map(e=>{var{pageCategory:t}=e;return t}).filter(e=>void 0!==e)}setName(){var e=["Carrinho","EasyCheckout_Identification","EasyCheckout_OrderConfirmation","EasyCheckout_OrderPlaced"];e=e.filter(e=>this.currentStep.toLowerCase()===e.toLowerCase()),this.name=!e.length&&this.currentStep?"Store":""}setCurrentStep(){[this.currentStep=""]=this.steps}getStepData(){return this.data||(this.data=this.dataLayer.find(e=>{var{pageCategory:t=""}=e;return""!==t&&this.currentStep.toLowerCase()===t.toLowerCase()})),this.data}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="ViewHome",this.step="Home",this.customData=null}getCustomDataParameters(){return this.customData}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){!function(t){"use strict";var n={};e.exports?(n.bytesToHex=r(85).bytesToHex,n.convertString=r(86),e.exports=s):(n.bytesToHex=t.convertHex.bytesToHex,n.convertString=t.convertString,t.sha256=s);var a=[];!function(){function e(e){for(var t=Math.sqrt(e),r=2;r<=t;r++)if(!(e%r))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var r=2,n=0;n<64;)e(r)&&(a[n]=t(Math.pow(r,1/3)),n++),r++}();var i=[],o=function(e,t,r){for(var n=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5],d=e[6],f=e[7],p=0;p<64;p++){if(p<16)i[p]=0|t[r+p];else{var h=i[p-15],v=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,g=i[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;i[p]=v+i[p-7]+y+i[p-16]}var b=n&o^n&s^o&s,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=f+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&l^~c&d)+a[p]+i[p];f=d,d=l,l=c,c=u+w|0,u=s,s=o,o=n,n=w+(m+b)|0}e[0]=e[0]+n|0,e[1]=e[1]+o|0,e[2]=e[2]+s|0,e[3]=e[3]+u|0,e[4]=e[4]+c|0,e[5]=e[5]+l|0,e[6]=e[6]+d|0,e[7]=e[7]+f|0};function s(e,t){e.constructor===String&&(e=n.convertString.UTF8.stringToBytes(e));var r=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],a=function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t}(e),i=8*e.length;a[i>>5]|=128<<24-i%32,a[15+(i+64>>9<<4)]=i;for(var s=0;s>>5]>>>24-r%32&255);return t}(r);return t&&t.asBytes?u:t&&t.asString?n.convertString.bytesToString(u):n.bytesToHex(u)}s.x2=function(e,t){return s(s(e,{asBytes:!0}),t)}}(this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="ViewCategory",this.step="catalogo"}getCustomDataParameters(){var e=this.application.getStepData();return{content_name:e.category,content_category:e.breadcrumb,content_ids:e.listProducts.map(e=>e.idProduct),content_type:"product"}}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="Search",this.step="busca"}getCustomDataParameters(){var e=this.application.getStepData();return{content_category:"Busca",content_ids:e.listProducts.map(e=>e.idProduct),content_type:"product",search_string:e.siteSearchTerm}}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(24),a=f(r(6)),i=f(r(7)),o=f(r(92)),s=f(r(46)),u=f(r(93)),c=f(r(94)),l=f(r(8)),d=f(r(2));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:new i.default(window.location.href)),this.dataFromApi={}}setSteps(){this.identificationStep=new o.default(this.dataLayer),this.cartStep=new s.default(this.dataLayer),this.checkoutStep=new u.default(this.dataLayer),this.purchaseStep=new c.default(this.dataLayer)}setName(){super.setName(),this.name=this.name?"Easycheckout API":""}getStepData(){var e=this;return y((function*(){if(!e.currentStepObject)return null;var t=e.currentStepObject.getName();if(e.dataFromApi[t])return e.dataFromApi[t];var r=e.currentStepObject.getApiRequestConfigs();return r?(e.dataFromApi[t]=yield l.default.request(h(h({},r),{},{params:{session_id:yield e.getSessionId(),store_id:d.default.getId(),nocahe:(0,n.v4)()}})).then(e=>e.data.data).catch(()=>null),e.dataFromApi[t]):(e.dataFromApi[t]=null,e.dataFromApi[t])}))()}getCustomer(){var e=this;return y((function*(){var t=yield e.getStepData();return t?t.cart.customer:null}))()}}var m=b;t.default=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(19)),a=i(r(3));function i(e){return e&&e.__esModule?e:{default:e}}class o extends n.default{constructor(e){super(e),this.name="Carrinho",this.hash="#carrinho",this.apiRequestConfigs={url:a.default.read("apiPaths.get.cart")}}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r(6)),a=c(r(7)),i=c(r(95)),o=c(r(20)),s=c(r(96)),u=c(r(97));function c(e){return e&&e.__esModule?e:{default:e}}class l extends n.default{constructor(e,t){super(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:new a.default(window.location.href)),this.data=null}setSteps(){this.identificationStep=new i.default(this.dataLayer),this.cartStep=new o.default(this.dataLayer),this.checkoutStep=new s.default(this.dataLayer),this.purchaseStep=new u.default(this.dataLayer)}setName(){super.setName(),this.name=this.name?"Easycheckout Var API":""}getStepData(){return this.currentStepObject?this.currentStepObject.getData():null}getCustomer(){var e=this.getStepData();return e?e.cart.customer:null}}var d=l;t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(4))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.hash="",this.data=null}isCurrent(){return window.location.hash===this.hash}getCurrentStep(){return this.isCurrent()?this:this.nextStep?this.nextStep.getCurrentStep():""}getData(){return this.data}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(50))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="AddToCart",this.step="Carrinho"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class o extends a.default{getCustomDataParameters(){var e,t=this;return(e=function*(){var e=yield t.application.getStepData();return{content_ids:e.cart.products.map(e=>e.id),content_type:"product",currency:"BRL",value:Number(e.cart.total)}},function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))})()}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(50))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="InitiateCheckout",this.step="EasyCheckout_OrderConfirmation"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(1)),a=i(r(16));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,u,"next",e)}function u(e){o(i,n,a,s,u,"throw",e)}s(void 0)}))}}class u extends n.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="Purchase",this.step="EasyCheckout_OrderPlaced"}getCustomDataParameters(){var e=this;return s((function*(){var t=yield e.application.getStepData();return{order_id:String(t.cart.orderId),value:Number(t.cart.total),content_ids:t.cart.products.map(e=>e.id),content_type:"product",currency:"BRL"}}))()}afterDispatch(){var e=()=>super.afterDispatch,t=this;return s((function*(){yield e().call(t);var r=yield t.application.getStepData(),n={fbtraceId:t.fbtraceId,parameters:t.lastParameters,orderId:r.cart.orderId};yield a.default.log(n)}))()}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var c=u;t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(54))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="AddToCart",this.step="Carrinho"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(1))&&n.__esModule?n:{default:n};class i extends a.default{isTriggerable(){if(!super.isTriggerable())return!1;var e=this.application.getStepData();return Number(e.cart.total)>0}getCustomDataParameters(){var e=this.application.getStepData();return{content_ids:e.cart.products.map(e=>e.id),content_type:"product",currency:"BRL",value:Number(e.cart.total)}}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(54))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="InitiateCheckout",this.step="EasyCheckout_OrderConfirmation"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(1)),a=i(r(16));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class s extends n.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="Purchase",this.step="EasyCheckout_OrderPlaced"}isTriggerable(){if(!super.isTriggerable())return!1;var e=this.application.getStepData();return e.cart.orderId&&!e.cart.lastOrderId&&Number(e.cart.checkout.total)>0}getCustomDataParameters(){var e=this.application.getStepData();return{order_id:String(e.cart.orderId),value:Number(e.cart.checkout.total),content_ids:e.cart.products.map(e=>e.id),content_type:"product",currency:"BRL"}}afterDispatch(){var e,t=()=>super.afterDispatch,r=this;return(e=function*(){yield t().call(r);var e=r.application.getStepData(),n={fbtraceId:r.fbtraceId,parameters:r.lastParameters,orderId:e.cart.orderId};yield a.default.log(n)},function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,u,"next",e)}function u(e){o(i,n,a,s,u,"throw",e)}s(void 0)}))})()}shouldBeSent(){return this.isTriggerable()?this.name:super.shouldBeSent()}}var u=s;t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(13))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))}}class s extends a.default{constructor(e,t,r,n,a){var i;super(e,t,r,n,a),i=this,window.addEventListener("hashchange",o((function*(){return i.onHashChange()})))}onHashChange(){var e=this;return o((function*(){yield e.dispatchAll(["PageView","AddToCart","InitiateCheckout","Purchase"])}))()}dispatch(e){var t=()=>super.dispatch,r=this;return o((function*(){return r.application.init(r.application.getDataLayer()),t().call(r,e)}))()}}var u=s;t.default=u},function(e,t,r){"use strict";var n=p(r(2)),a=p(r(25)),i=p(r(60)),o=p(r(107)),s=p(r(28)),u=p(r(27)),c=p(r(26)),l=p(r(18)),d=p(r(3)),f=p(r(108));function p(e){return e&&e.__esModule?e:{default:e}}d.default.load(f.default),e.exports={Store:n.default,Initiator:i.default,HtmlLogger:o.default,DefaultFactory:s.default,ApiFactory:u.default,VarApiFactory:c.default,NewRelicLogger:l.default,Browser:a.default}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class n{static permute(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=[...e],i=t;i0&&void 0!==arguments[0]?arguments[0]:null,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dataLayer",arguments.length>2&&void 0!==arguments[2]?arguments[2]:new a.default)}}var s=o;t.default=s},function(e,t,r){"use strict";function n(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function s(e){n(o,a,i,s,u,"next",e)}function u(e){n(o,a,i,s,u,"throw",e)}s(void 0)}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(e,t,r){this.logger=e||console,this.observedVariable=t,this.observableFactory=r}init(){var e=this;return a((function*(){window[e.observedVariable]?yield e.observableFactory.init(window[e.observedVariable],e.logger):window.addEventListener("load",a((function*(){window[e.observedVariable]&&(yield e.observableFactory.init(window[e.observedVariable],e.logger))})),!1)}))()}}},function(e,t,r){e.exports=r(63)},function(e,t,r){"use strict";var n=r(0),a=r(30),i=r(64),o=r(36),s=function e(t){var r=new i(t),s=a(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return e(o(t,r))},s}(r(9));s.Axios=i,s.Cancel=r(10),s.CancelToken=r(78),s.isCancel=r(35),s.VERSION=r(37).version,s.all=function(e){return Promise.all(e)},s.spread=r(79),s.isAxiosError=r(80),e.exports=s,e.exports.default=s},function(e,t,r){"use strict";var n=r(0),a=r(31),i=r(65),o=r(66),s=r(36),u=r(77),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var l=[o,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),a=Promise.resolve(e);l.length;)a=a.then(l.shift(),l.shift());return a}for(var d=e;r.length;){var f=r.shift(),p=r.shift();try{d=f(d)}catch(e){p(e);break}}try{a=o(d)}catch(e){return Promise.reject(e)}for(;i.length;)a=a.then(i.shift(),i.shift());return a},l.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},function(e,t,r){"use strict";var n=r(0);function a(){this.handlers=[]}a.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,r){"use strict";var n=r(0),a=r(67),i=r(35),o=r(9),s=r(10);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return u(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(0),a=r(9);e.exports=function(e,t,r){var i=this||a;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&p())}function p(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var r=1;r=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function a(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=a(window.location.href),function(t){var r=n.isString(t)?a(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(37).version,a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};a.transitional=function(e,t,r){function a(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,o){if(!1===e)throw new Error(a(n," has been removed"+(t?" in "+t:"")));return t&&!i[n]&&(i[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],o=t[i];if(o){var s=e[i],u=void 0===s||o(s,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:a}},function(e,t,r){"use strict";var n=r(10);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;te.toLocaleLowerCase());t.default=e=>{var t=new AbortController,r=window.navigator.userAgent.toLocaleLowerCase();return o.find(e=>r.includes(e))&&t.abort(),a(a({},e),{},{signal:t.signal})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(4))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_Identification"}getCurrentStep(){return this.isCurrent()?this:super.getCurrentStep()}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(38))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_OrderConfirmation"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(13))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))}}class s extends a.default{constructor(e,t,r,n,a){var i;super(e,t,r,n,a),i=this,this.attachDataLayerObservableProps(),window.addEventListener("hashchange",o((function*(){return i.onHashChange()})))}attachDataLayerObservableProps(){var e=this.application.getDataLayer().push,t=this;Object.defineProperty(this.application.getDataLayer(),"push",{value(){var r=arguments,n=this;return o((function*(){for(var a=r.length,i=new Array(a),o=0;osuper.dispatch,r=this;return o((function*(){return r.application.init(r.application.getDataLayer()),t().call(r,e)}))()}}var u=s;t.default=u},function(e,t,r){!function(t){"use strict";var r={bytesToHex:function(e){return function(e){return e.map((function(e){return(t=e.toString(16)).length>2?t:Array(2-t.length+1).join("0")+t;var t})).join("")}(e)},hexToBytes:function(e){if(e.length%2==1)throw new Error("hexToBytes can't have a string with an odd number of characters.");return 0===e.indexOf("0x")&&(e=e.slice(2)),e.match(/../g).map((function(e){return parseInt(e,16)}))}};e.exports?e.exports=r:t.convertHex=r}(this)},function(e,t,r){!function(t){"use strict";var r={bytesToString:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")},stringToBytes:function(e){return e.split("").map((function(e){return e.charCodeAt(0)}))}};r.UTF8={bytesToString:function(e){return decodeURIComponent(escape(r.bytesToString(e)))},stringToBytes:function(e){return r.stringToBytes(unescape(encodeURIComponent(e)))}},e.exports?e.exports=r:t.convertString=r}(this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(14))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="ViewProduct"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(15))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="AddToCart",this.step="Carrinho"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(15))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="InitiateCheckout",this.step="EasyCheckout_OrderConfirmation"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(15)),a=i(r(16));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class s extends n.default{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date),this.name="Purchase",this.step="EasyCheckout_OrderPlaced"}getCustomDataParameters(){var e=this.application.getStepData();return{order_id:String(e.ecommerce.purchase.actionField.id),value:Number(e.ecommerce.purchase.actionField.revenue),content_ids:e.ecommerce.purchase.products.map(e=>String(e.id)),currency:"BRL",content_type:"product"}}afterDispatch(){var e,t=()=>super.afterDispatch,r=this;return(e=function*(){yield t().call(r);var e=r.application.getStepData(),n={fbtraceId:r.fbtraceId,parameters:r.lastParameters,orderId:e.ecommerce.purchase.actionField.id};yield a.default.log(n)},function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,u,"next",e)}function u(e){o(i,n,a,s,u,"throw",e)}s(void 0)}))})()}}var u=s;t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(5),a=_(r(2)),i=_(r(18)),o=_(r(40)),s=_(r(6)),u=_(r(45)),c=_(r(47)),l=_(r(21)),d=_(r(22)),f=_(r(41)),p=_(r(14)),h=_(r(43)),v=_(r(44)),g=_(r(49)),y=_(r(51)),b=_(r(52)),m=_(r(53)),w=_(r(55)),P=_(r(56));function _(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function C(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){O(i,n,a,o,s,"next",e)}function s(e){O(i,n,a,o,s,"throw",e)}o(void 0)}))}}t.default=class{constructor(e,t,r,n){this.events=["PageView","ViewContent","Search","AddToCart","InitiateCheckout","Purchase"],this.customEvents=["ViewHome","ViewProduct","ViewCategory"],this.initiated=!1,this.application=e,this.logger=t,this.debugBar=r,this.newRelicLogger=n,this.pixelId="",this.thirdPartPixelId="",this.pixelScriptSrc="https://connect.facebook.net/en_US/fbevents.js"}appendPixelScript(){var e=this;return C((function*(){e.pixelId=yield e.application.getPixelId();var t,r,o,s,u,c,l,d=e;t=window,r=document,o="script",s=e.pixelScriptSrc,t.fbq||(u=t.fbq=C((function*(){var e=yield d.isValidPixel(...arguments);if(e)u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments);else{var[t=""]=arguments,[,r]=["track","trackCustom"].indexOf(t)>=0?arguments:[t,""],o=new i.default(d.application);o.addParams({fbe_store_id:a.default.getId(),fbe_location_uri:window.location.href,fbe_application_step:d.application.getCurrentStep(),fbe_client_user_agent:navigator.userAgent,fbe_script_version:n.version,fbe_pixel:d.pixelId,fbe_third_part_pixel:d.thirdPartPixelId,fbe_third_part_pixel_called_method:t,fbe_third_part_pixel_event_name:r,fbe_has_third_part_integration:1}),yield o.sendParams()}})),t._fbq||(t._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],(c=r.createElement(o)).async=!0,c.src=s,(l=r.getElementsByTagName(o)[0]).parentNode.insertBefore(c,l))}))()}init(e){var t=this;return C((function*(){if(t.initiated)return!0;if(!t.pixelId)return!1;t.initiated=!0;var{external_id:r="",em:a="",fn:i="",ln:o="",ph:s="",ct:u="",st:c="",zp:l="",country:d=""}=e,f={external_id:r,em:a,fn:i,ln:o,ph:s,ct:u,st:c,zp:l,country:d};return Object.entries(f).forEach(e=>{var[t,r]=e;r||delete f[t]}),t.logger.info("[Facebook Pixel-Tray ".concat(n.version,"] PixelID: ").concat(t.pixelId)),yield window.fbq("init",t.pixelId,f),!0}))()}track(e){var t=this;return C((function*(){if(!t.initiated)return!1;var{custom_data:r=null,event_name:a=null,event_id:i=null}=e;if(!a)return!1;t.logger.info("[Facebook Pixel-Tray ".concat(n.version,"] Event ").concat(a));var o=t.events.indexOf(a)>=0?"track":"trackCustom";return r?(yield window.fbq(o,a,r,{eventID:i}),!0):(yield window.fbq(o,a,{},{eventID:i}),!0)}))()}getEventToBeSent(){var e=this.application instanceof s.default?new d.default(this.application,this.newRelicLogger):new l.default(this.application,this.newRelicLogger),t=new f.default(e),r=new p.default(e),n=new h.default(e),a=new v.default(e),i=new g.default(e),_=new y.default(e),O=new b.default(e),C=new m.default(e),x=new w.default(e),S=new P.default(e);return t.init(this.application,this.logger),r.init(this.application,this.logger),n.init(this.application,this.logger),a.init(this.application,this.logger),i.init(this.application,this.logger),_.init(this.application,this.logger),O.init(this.application,this.logger),C.init(this.application,this.logger),x.init(this.application,this.logger),S.init(this.application,this.logger),this.application instanceof o.default&&t.setNext(r).setNext(n).setNext(a),this.application instanceof u.default&&t.setNext(i).setNext(_).setNext(O),this.application instanceof c.default&&t.setNext(C).setNext(x).setNext(S),t.shouldBeSent()}isValidPixel(){var e=arguments,t=this;return C((function*(){for(var r=e.length,a=new Array(r),i=0;i=0,{events:u,customEvents:c,thirdPartPixelId:l,debugBar:d,logger:f}=t;if(!s)return yield d.appendMessage("Tried to call method ".concat(o," via third-part pixel ").concat(l),"#f50505"),f.info("[Facebook Pixel-Tray ".concat(n.version,"] Tried to call method ").concat(o," via third-part pixel ").concat(l)),s;var[,p="",h]=a;if(s="init"===o&&h===Object(h),"init"===o&&!s)return t.thirdPartPixelId=p,yield d.appendMessage("Tried to initiate third-part pixel ".concat(p),"#f50505"),f.info("[Facebook Pixel-Tray ".concat(n.version,"] Tried to initiate third-part pixel ").concat(p)),s;if("init"===o)return yield d.appendMessage("Pixel ".concat(p," initiated")),s;var[,v="",g,y]=a;if(s=v&&u.indexOf(v)<0&&c.indexOf(v)<0)return yield d.appendMessage("Event ".concat(v," sent via third-part pixel ").concat(l)),f.info("[Facebook Pixel-Tray ".concat(n.version,"] Event ").concat(v," sent via third-part pixel ").concat(l)),s;if(s=v&&g===Object(g)&&y===Object(y))return yield d.appendMessage("Event ".concat(v," sent via pixel")),s;var b=t.getEventToBeSent();return v&&"PageView"!==v&&b!==v?(yield d.appendMessage("Event ".concat(v," sent via third-part pixel ").concat(l)),f.info("[Facebook Pixel-Tray ".concat(n.version,"] Event ").concat(v," sent via third-part pixel ").concat(l)),s):(yield d.appendMessage("Tried to send event ".concat(v," via third-part pixel ").concat(l),"#f50505"),f.info("[Facebook Pixel-Tray ".concat(n.version,"] Tried to send event ").concat(v," via third-part pixel ").concat(l)),s)}))()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(19))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_Identification",this.hash="#identifique_se"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(46))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_OrderConfirmation",this.hash="#principal"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(19)),a=i(r(3));function i(e){return e&&e.__esModule?e:{default:e}}class o extends n.default{constructor(e){super(e),this.name="EasyCheckout_OrderPlaced",this.hash="#finalizacao",this.apiRequestConfigs={url:a.default.read("apiPaths.get.finalize")}}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(48))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_Identification",this.hash="#identifique_se"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(20))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_OrderConfirmation",this.hash="#principal"}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(20))&&n.__esModule?n:{default:n};class i extends a.default{constructor(e){super(e),this.name="EasyCheckout_OrderPlaced",this.hash="#finalizacao"}}var o=i;t.default=o},function(e,t,r){!function(t){"use strict";for(var r=[null,0,{}],n=function(e,t){this.codepoint=e,this.feature=t},a={},i=[],o=0;o<=255;++o)i[o]=0;var s=[function(e,t,a){return t<60||13311>8&255]>10&&(a[t]=n),n},function(e,t,r){return r?e(t,r):new n(t,null)},function(e,t,r){var a;if(t<4352||4371<=t&&t<44032||55204=55296&&e<=56319},n.isLowSurrogate=function(e){return e>=56320&&e<=57343},n.prototype.prepFeature=function(){this.feature||(this.feature=n.fromCharCode(this.codepoint,!0).feature)},n.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var e=this.codepoint-65536;return String.fromCharCode(Math.floor(e/1024)+55296,e%1024+56320)},n.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},n.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&256&this.feature[1]},n.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&512&this.feature[1]},n.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?255&this.feature[1]:0},n.prototype.getComposite=function(e){if(this.prepFeature(),!this.feature[2])return null;var t=this.feature[2][e.codepoint];return t?n.fromCharCode(t):null};var u=function(e){this.str=e,this.cursor=0};u.prototype.next=function(){if(this.str&&this.cursor0&&!(this.resBuf[r-1].getCanonicalClass()<=e);--r);this.resBuf.splice(r,0,t)}while(0!==e);return this.resBuf.shift()};var d=function(e){this.it=e,this.procBuf=[],this.resBuf=[],this.lastClass=null};d.prototype.next=function(){for(;0===this.resBuf.length;){var e=this.it.next();if(!e){this.resBuf=this.procBuf,this.procBuf=[];break}if(0===this.procBuf.length)this.lastClass=e.getCanonicalClass(),this.procBuf.push(e);else{var t=this.procBuf[0].getComposite(e),r=e.getCanonicalClass();t&&(this.lastClass{var[t,r]=e.split("=");return"fbclid"===t&&r})||"",[,n=""]=r.split("="),i=1e3*e;n&&(a.default.write("_fbc","fb.1.".concat(i,".").concat(decodeURIComponent(n))),s.newRelicLogger.addParam("fbc_from_url","1"))}}}))()}}var u=s;t.default=u},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{var[t,r]=e.replace(/^[\s]+/,"").replace(/[\s]+$/,"").split("=");t&&(o.entries[t]=r)}),o.entries}static read(e){var t=o.getEntries();return t[e]?t[e]:""}static write(e,t){return o.entries=o.entries?a(a({},o.entries),{},{[e]:t}):{[e]:t},document.cookie="".concat(e,"=").concat(t,";path=/"),!0}static delete(e){return!!o.getEntries()[e]&&(delete o.entries[e],document.cookie="".concat(e,"=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/"),!0)}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(11))&&n.__esModule?n:{default:n};class i{static validate(e){if(!e.match(/^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/g))return!1;var t=i.toInt(e);return i.intToIp(t)===e}static toInt(e){var t=new a.default;t.compatibilize();var r=e.split(".").reduce((e,t)=>(parseInt(e,10)<<8)+parseInt(t,10),0)>>>0;return t.restore(),r}static intToIp(e){return"".concat(e>>>24,".").concat(e>>16&255,".").concat(e>>8&255,".").concat(255&e)}}var o=i;t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(103))&&n.__esModule?n:{default:n};function i(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}class o{constructor(e,t){this.application=e,this.newRelicLogger=t,this.parameters={},this.toHash=[],this.data=null}init(e){this.data=o.filterEntries(e)}getParemetersToHash(){return this.toHash}getParameters(){var e,t=this;return(e=function*(){var e=yield t.getParametersTemplate();return t.parameters=o.filterEntries(e),(0,a.default)(t)},function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))})()}setParameter(e,t){this.parameters[e]=t}getParameter(e){return this.parameters[e]||null}getAllParameters(){return this.parameters}static filterEntries(e){if(!e)return null;var t={};return Object.entries(e).forEach(e=>{var[r,n]=e;n&&(t[r]=n===Object(n)?o.filterEntries(n):n)}),Object.entries(t).length?t:null}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(42))&&n.__esModule?n:{default:n};t.default=e=>(e.getParemetersToHash().forEach(t=>{var r=e.getParameter(t);r&&e.setParameter(t,(0,a.default)(r.toLowerCase().replace(/^[\s]+/,"").replace(/[\s]+$/,"")))}),e.getAllParameters())},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={"":"br",bra:"br",brasil:"br",brazil:"br"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={br:"55"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(5);function a(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}class o{constructor(e){this.application=e,this.isCurrentlyOpen=!1,this.create()}create(){var e=this;this.onDragStart=e=>{this.body.style.setProperty("left","".concat(e.pageX+this.shiftX,"px"),"important"),this.body.style.setProperty("top","".concat(e.pageY+this.shiftY,"px"),"important")},this.disableTextSelect=e=>(e.preventDefault(),!1),this.onDrop=i((function*(){e.shiftX=0,e.shiftY=0,e.controllBar.removeEventListener("mousemove",e.onDragStart),e.pageBody.removeEventListener("mouseup",e.onDrop),window.removeEventListener("selectstart",e.disableTextSelect),e.pageBody.style.setProperty("cursor","auto");var t=window.getComputedStyle(e.body,null),r=t.getPropertyValue("left"),n=t.getPropertyValue("top");yield e.application.saveDebugBarCoordinates(r,n)})),[this.pageBody]=document.getElementsByTagName("body"),this.body=document.createElement("div"),this.body.id="facebook-conversions-debug-bar",this.body.style.setProperty("z-index",9999999),this.body.style.setProperty("font-family","Arial","important"),this.body.style.setProperty("font-size","14px"),this.body.style.setProperty("background-color","#e8e7e7"),this.body.style.setProperty("display","none"),this.body.style.setProperty("width","740px"),this.body.style.setProperty("margin",0),this.body.style.setProperty("padding",0),this.body.style.setProperty("box-sizing","content-box","important"),this.body.style.setProperty("position","absolute"),this.body.style.setProperty("top","10px"),this.body.style.setProperty("right","10px"),this.body.style.setProperty("line-height","normal"),this.body.style.setProperty("font-weight","normal"),this.body.style.setProperty("transition","unset"),this.controllBar=document.createElement("p"),this.controllBar.addEventListener("dragstart",e=>(e.preventDefault(),!1)),this.controllBar.addEventListener("mousedown",e=>this.mouseDown(e)),this.controllBar.style.setProperty("cursor","pointer"),this.controllBar.style.setProperty("background-color","#0000ff"),this.controllBar.style.setProperty("color","#fff"),this.controllBar.style.setProperty("height","25px"),this.controllBar.style.setProperty("margin",0),this.controllBar.style.setProperty("position","relative"),this.controllBar.style.setProperty("padding","5px"),this.controllBar.style.setProperty("box-sizing","content-box","important");var t=document.createElement("span");t.appendChild(document.createTextNode("Facebook Conversions Console - ".concat(n.version))),t.style.setProperty("font-size","14px"),t.style.setProperty("line-height","25px"),t.style.setProperty("font-weight","bold"),t.style.setProperty("font-family","Arial","important"),t.style.setProperty("color","#fff"),this.closeButton=document.createElement("button"),this.closeButton.style.setProperty("background-color","red"),this.closeButton.style.setProperty("font-family","Arial","important"),this.closeButton.style.setProperty("color","#fff"),this.closeButton.style.setProperty("border","none"),this.closeButton.style.setProperty("height","25px"),this.closeButton.style.setProperty("width","25px"),this.closeButton.style.setProperty("min-width","25px"),this.closeButton.style.setProperty("max-width","25px"),this.closeButton.style.setProperty("position","absolute"),this.closeButton.style.setProperty("right","5px"),this.closeButton.style.setProperty("top","5px"),this.closeButton.style.setProperty("font-size","18px"),this.closeButton.style.setProperty("text-align","center"),this.closeButton.style.setProperty("font-weight","bold"),this.closeButton.style.setProperty("line-height","normal"),this.closeButton.appendChild(document.createTextNode("x")),this.closeButton.addEventListener("click",i((function*(){return e.close()}))),this.controllBar.appendChild(t),this.controllBar.appendChild(this.closeButton),this.body.appendChild(this.controllBar),this.pageBody.appendChild(this.body)}mouseDown(e){var t=window.getComputedStyle(this.body,null);this.shiftX=Number(t.getPropertyValue("left").replace(/[^\d-]/g,""))-e.clientX,this.shiftY=Number(t.getPropertyValue("top").replace(/[^\d-]/g,""))-e.clientY,this.controllBar.addEventListener("mousemove",this.onDragStart),this.pageBody.addEventListener("mouseup",this.onDrop),window.addEventListener("selectstart",this.disableTextSelect),this.pageBody.style.setProperty("cursor","pointer")}open(){var e=this;return i((function*(){if(e.isOpened())return!0;if(e.isCurrentlyOpen=yield e.application.isDebuggingMode(),!e.isCurrentlyOpen)return e.isCurrentlyOpen;var t=yield e.application.getDebugBarCoordinates();return Object.entries(t).length?(e.body.style.setProperty("display","inline-block"),e.body.style.setProperty("left",t.left),e.body.style.setProperty("top",t.top),e.isCurrentlyOpen):(e.body.style.setProperty("display","inline-block"),e.isCurrentlyOpen)}))()}close(){var e=this;return i((function*(){if(!e.isOpened())return!0;var t=yield e.application.setDebugMode(0);return e.isCurrentlyOpen=!t,e.isCurrentlyOpen||e.body.style.setProperty("display","none"),!e.isCurrentlyOpen}))()}appendRequest(e,t,r,n,a){var s=this;return i((function*(){if(!(yield s.open()))return!1;var i=document.createElement("div");i.style.setProperty("padding","5px 5px 10px 5px"),i.style.setProperty("box-sizing","content-box","important"),i.style.setProperty("margin-bottom","5px");var u=document.createElement("p");u.style.setProperty("box-sizing","content-box","important"),u.style.setProperty("font-family","Arial","important"),u.style.setProperty("font-size","14px"),u.style.setProperty("margin",0),u.style.setProperty("margin-bottom","5px"),u.style.setProperty("color","#000"),u.style.setProperty("line-height","normal"),u.style.setProperty("font-weight","normal"),u.appendChild(document.createTextNode("".concat(r," - [").concat(e,"] ").concat(t)));var c=document.createElement("div");c.style.setProperty("position","relative"),c.style.setProperty("height","190px");var l=o.getColumn(JSON.stringify(n,null,2));l.style.setProperty("left",0);var d=o.getColumn(JSON.stringify(a,null,2));return d.style.setProperty("right",0),c.appendChild(l),c.appendChild(d),i.appendChild(u),i.appendChild(c),s.body.appendChild(i),!0}))()}appendMessage(e){var t=arguments,r=this;return i((function*(){var n=t.length>1&&void 0!==t[1]?t[1]:"#000";if(!(yield r.open()))return!1;var a=document.createElement("div");a.style.setProperty("padding","5px 5px 10px 5px"),a.style.setProperty("box-sizing","content-box","important"),a.style.setProperty("margin-bottom","5px");var i=document.createElement("div");i.style.setProperty("position","relative"),i.style.setProperty("width","730px"),i.style.setProperty("height","50px");var s=o.getColumn(e,50,n);return s.style.setProperty("left",0),s.style.setProperty("width","730px"),i.appendChild(s),a.appendChild(i),r.body.appendChild(a),!0}))()}static getColumn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:190,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#000",n=document.createElement("div");n.style.setProperty("box-sizing","content-box"),n.style.setProperty("position","absolute"),n.style.setProperty("background-color","#dad8d8"),n.style.setProperty("width","360px"),n.style.setProperty("height","".concat(t+10,"px")),n.style.setProperty("overflow","auto"),n.style.setProperty("top",0);var a=document.createElement("p");a.style.setProperty("margin",0);var i=document.createElement("pre");return i.style.setProperty("min-height","".concat(t,"px")),i.style.setProperty("padding","5px"),i.style.setProperty("box-sizing","content-box"),i.style.setProperty("margin",0),i.style.setProperty("font-family","monospace","important"),i.style.setProperty("color",r),i.style.setProperty("font-size","14px"),i.style.setProperty("font-weight","normal"),i.style.setProperty("overflow","unset"),i.style.setProperty("line-height","normal"),i.style.setProperty("background","unset"),i.style.setProperty("border","unset"),i.style.setProperty("border-radius","unset"),i.appendChild(document.createTextNode(e)),a.appendChild(i),n.appendChild(a),n}isOpened(){return this.isCurrentlyOpen}}var s=o;t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r(29))&&n.__esModule?n:{default:n};class i extends a.default{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;super(),this.target=e||document.body}info(e){super.info(e);var t=document.createElement("p"),r=document.createTextNode("Info: ".concat(e));t.appendChild(r),this.target.appendChild(t)}}var o=i;t.default=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=((n=r(2))&&n.__esModule?n:{default:n}).default.getId(),i={apiPaths:{post:{conversions:"/mvc/store/facebook_conversions/event/send",orderLog:"/mvc/store/facebook_conversions/event/logs",newRelicLog:"/checkout/cart/newrelic-simulation/custom-param",debug:"/mvc/store/facebook_conversions/debug"},get:{updateGTM:"/mvc/store/".concat(a,"/google_tag_manager/updateGTM.json"),noCacheApp:"/nocache/app.php",cart:"/checkout/cart/api",finalize:"/checkout/finalize",noCacheInfo:"/nocache/info.php",facebookInfo:"/nocache/facebook-info.php"}},hotjar:{siteId:2440340}};t.default=i}])}]);